<template>
  <el-tabs v-model="activeTab">
    <el-tab-pane label="待审核" name="WAITING">
      <waiting-table @records="row => $refs.elRecords.show(row)"
                     @config="guid => $refs.elConfig.show(guid)"
                     @export="params => $refs.elExport.show(params)">
        <el-button type="primary" @click="$refs.elAdd.show()">新增</el-button>
      </waiting-table>
    </el-tab-pane>
    <el-tab-pane label="试用中" name="TRYING" lazy>
      <trying-table @records="row => $refs.elRecords.show(row)"
                    @export="params => $refs.elExport.show(params)"></trying-table>
    </el-tab-pane>
    <el-tab-pane label="搁置用户" name="SHELVE" lazy>
      <shelve-table @config="guid => $refs.elConfig.show(guid)"
                    @records="row => $refs.elRecords.show(row)"
                    @export="params => $refs.elExport.show(params)"></shelve-table>
    </el-tab-pane>
    <el-tab-pane label="试用转正" name="NORMAL" lazy>
      <normal-table @export="params => $refs.elExport.show(params)"></normal-table>
    </el-tab-pane>
    <el-tab-pane label="停滞用户" name="STOP" lazy>
      <stop-table @export="params => $refs.elExport.show(params)"
                  @records="row => $refs.elRecords.show(row)"></stop-table>
    </el-tab-pane>
  </el-tabs>
  <config ref="elConfig"></config>
  <add ref="elAdd"></add>
  <records ref="elRecords"></records>
  <export ref="elExport"></export>
</template>

<script setup>
  
  import {
     ref,
     reactive,
     inject
  } from 'vue'
  
  import WaitingTable from './components/waiting-table.vue'
  import TryingTable from './components/trying-table.vue'
  import ShelveTable from './components/shelve-table.vue'
  import NormalTable from './components/normal-table.vue'
  import StopTable from './components/stop-table.vue'
  import Config from './components/config.vue'
  import Add from './components/add.vue'
  import Records from './components/records.vue'
  import Export from './components/export.vue'
  
  const activeTab = ref('WAITING');
  
  const elRecords = ref();
  
</script>

<style>
</style>
